import React from 'react';
import cx from 'classnames';

import './css/ionicons.css';

export default class Icon extends React.Component {
  static propTypes = {
    name: React.PropTypes.string,
    type: React.PropTypes.string,
    className: React.PropTypes.string,
    children: React.PropTypes.oneOf([
      React.PropTypes.object,
      React.PropTypes.array
    ]),
  };

  constructor(props) {
    super(props);
  }

  render() {
    let {type, className, children, ...other} = this.props;
    return (
      <i className={cx("icon", `ion-${type}`, className)} {...other}>{children}</i>
    );
  }
}
